﻿IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_TemplateRegionAdd]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[cms_sp_TemplateRegionAdd]
GO
CREATE procedure [dbo].[cms_sp_TemplateRegionAdd]
(
@TemplateId int,
@TemplateRegionName nvarchar(250)
)
as

insert into dbo.TemplateRegions
(
TemplateId,
TemplateRegionName
)
values
(
@TemplateId,
@TemplateRegionName
)
    
declare @Id int
set @Id = SCOPE_IDENTITY()

return @Id
           
GO